package com.digitalchina.lxnsy.sy.all;

import android.webkit.JavascriptInterface;

import com.digitalchina.lxnsy.base.BaseHtmlActivity;
import com.digitalchina.lxnsy.sy.main.Main3Fragment;
import com.digitalchina.lxnsy.sy.peopleAddExp.DetailsRepliedActivity;
import com.digitalchina.lxnsy.sy.peopleAddExp.ReplyDetailsActivity;


public class MsgActivity extends BaseHtmlActivity {
    private int tag = 0;

    @Override
    protected void loadHtml() {
        webView.addJavascriptObject(new JsApi(), null);
        loadUrl("personalMessageList");
        setTitle("消息");
    }

    @Override
    public void onResume() {
        super.onResume();
        if (tag > 0) {
            callJsMethod("refresh");
        }
        tag++;

    }

    @Override
    public void rightOnClick() {


    }


    public class JsApi {


        @JavascriptInterface
        public void replyDetails(Object msg) {
            go(ReplyDetailsActivity.class);

        }

        @JavascriptInterface
        public void detailsReplied(Object msg) {
            go(DetailsRepliedActivity.class);

        }


        @JavascriptInterface
        public void expertReplied(Object msg) {
            go(ExpertRepliedActivity.class);

        }


    }
}